//
//  LHConnection.h
//  GameKitDemo
//
//  Created by Xiaobin Li on 7/18/15.
//  Copyright (c) 2015 Xiaobin Li. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <GameKit/GameKit.h>
#import "LHConnectionDelegate.h"
#import "LHBrowserControllerDelegate.h"

@interface LHConnection : NSObject <GKPeerPickerControllerDelegate, GKSessionDelegate, GKVoiceChatClient, LHBrowserControllerDelegate>

@property (nonatomic, weak) id<LHConnectionDelegate> delegate;
@property (nonatomic, copy) NSString *remotePeerID;
@property (nonatomic, getter = isConnected) BOOL connected;
@property (nonatomic, readonly) NSString *otherPeerName;
@property (nonatomic, strong) GKSession *chatSession;

- (void)connect;
- (void)disconnect;
- (void)answerIncomingCall;
- (void)denyIncomingCall;
- (GKSession *)createChatSession;

@end
